package com.meilai.project.controller.web.adMake.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.meilai.project.core.bean.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * <p>
 * 制作单-供应商确认后，留存当时的材质单价
 * </p>
 *
 * @author 张驰
 * @since 2022-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("bill_ad_make_supplier_confirm_price")
@ApiModel(value="BillAdMakeSupplierConfirmPrice对象", description="制作单-供应商确认后，留存当时的材质单价")
public class BillAdMakeSupplierConfirmPrice extends SuperEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "确认表id，对应bill_ad_make_supplier_confirm的id")
    private Long confirm_id;

    @ApiModelProperty(value = "材质，字典id")
    private Long material_texture_id;

    @ApiModelProperty(value = "单价(/平米)")
    private BigDecimal price;


    public static final String CONFIRM_ID = "confirm_id";

    public static final String MATERIAL_TEXTURE_ID = "material_texture_id";

    public static final String PRICE = "price";

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof BillAdMakeSupplierConfirmPrice)) return false;
        if (!super.equals(o)) return false;
        BillAdMakeSupplierConfirmPrice that = (BillAdMakeSupplierConfirmPrice) o;
        return Objects.equals(getConfirm_id(), that.getConfirm_id()) &&
                Objects.equals(getMaterial_texture_id(), that.getMaterial_texture_id());
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), getConfirm_id(), getMaterial_texture_id());
    }
}
